<?php
$this->headTitle('Thành viên','append');
?>
<div class="dashboard-menu dashboard-admin">
    <span class="back">&nbsp;</span>
    <a href="/admin/user"><h1>Thành viên</h1></a>
    <span class="text">Sửa thông tin</span>
</div>
<div class="row placeholders">
    <div class="col-md-12">
        <div class="widget-big">
            <div class="search-result text-left">
                <?php
                    if(isset($this->mess)){
                        if($this->flag == 'success')
                            echo '<div class="bg-success">',$this->mess,'</div>';
                        elseif($this->flag == 'alert')
                            echo '<div class="bg-warning">',$this->mess,'</div>';
                        else
                            echo '<div class="bg-danger">',$this->mess,'</div>';
                    }
                    echo $this->form;
                ?>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(function(){$( "#datepicker" ).datepicker({dateFormat:'yy-mm-dd'});});
	$("form > dl.zend_form > dd#address-element").after(
        '<dt id="avatarCur-label"><label class="optional">Hình đại hiện</label></dt>'+
        '<dd id="avatarCur-element"><img src="<?=$this->userCheck["avatar"]?>" style="width:100px;height:100px;" title="Hình đại diện" onerror="this.onerror=null;this.src=\'/static/images/noimage.jpg\';"/></dd>'
    );
    function readURL(input) {
        if (input.files && input.files[0]) {
            var reader = new FileReader();
            reader.onload = function (e) {
                $('#avatarCur-element img').attr('src', e.target.result);
            }
            reader.readAsDataURL(input.files[0]);
        }
    }
    $("#avatar").change(function(){
        readURL(this);
    });
</script>
